import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';
import {FormBuilder} from '@angular/forms';
import {FormUtil} from '../../../utils/form-util';

@Component({
  selector: 'dhl-form',
  templateUrl: './dhl-form.component.html',
})
export class DhlFormComponent implements OnInit {

  @Input() submiturl;
  @ViewChild('dhlform', {static: true, read: ElementRef}) fromRef: ElementRef;

  constructor(private fb: FormBuilder) {
  }

  ngOnInit() {
    this.iniFormData();
  }

  iniFormData() {

  }

  submitForm(): void {

    console.log(FormUtil.getData(this.fromRef.nativeElement));

  }


}



